#!/bin/bash
#$Id$
#
# download eve character asset list
# (c) 2010 bitmech.com; see LICENSE.
#
APIBASE=http://api.eve-online.com
OUTPUT=AssetList.xml
METHOD=/char/${OUTPUT}.aspx
URL=${APIBASE}${METHOD}

#
# file containing api key data for the character you want
APIKEY=../auth/.apikey

wget --post-file ${APIKEY} -O ${OUTPUT} ${URL}>/dev/null 2>&1; rc=$? 
if [ ${rc} -ne 0 ]; then
    echo "There appears to have been a problem with method ${METHOD}."
else
    echo "Data downloaded to file ${OUTPUT}."
fi
exit ${rc}
